package com.c.pojo.entity;

import com.alibaba.fastjson.JSON;
import com.c.pojo.BaseEntity;

import javax.persistence.*;

/**
 * @author bysun
 */
@Entity
public class User extends BaseEntity {

    @Column(name = "username", nullable = false)
    private String userName;

    @Column(name = "pwd", nullable = false, length = 32)
    private String pwd;

    @Column(name = "gender", nullable = false, columnDefinition = "tinyint default 0")
    private Integer gender;

    @Column(name = "mobile", nullable = false, length = 20)
    private String mobile;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public String toString() {
        return super.toString() + JSON.toJSONString(this);
    }
}
